package com.liang.lingdong.model.auth.dto;


import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotBlank;

/**
 * 用户登录请求
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class UserLoginDto {

    /**
     * 用户账户
     */
    @NotBlank
    @Length(max = 20, message = "用户账号长度不能超过20个字符")
    private String userAccount;

    /**
     * 用户密码
     */
    @NotBlank
    @Length(max = 20, message = "用户密码长度不能超过20个字符")
    private String userPassword;

    /**
     * 验证码Id
     */
    @NotBlank
    private String uId;

    /**
     * 验证码
     */
    @NotBlank
    @Length(min = 6, max = 6, message = "验证码长度不符合要求")
    private String authCode;
}
